package _Collection;


import java.util.HashSet;
        import java.util.Scanner;

public class _Set {

    public static void main(String[] args) {
        HashSet<Object> hashSet = new HashSet<>();
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < 5; i++) {
            hashSet.add(scanner.next());
        }
// ---------------------Begin------------------------

        // 增
        hashSet.add("helloHashSet");
        // 改
        if(hashSet.contains("cat")) {
            hashSet.remove("cat");
            hashSet.add("fish");
        }
        // 删
        hashSet.remove("apple");

// ---------------------End------------------------
        hashSet.forEach(ele -> System.out.println(ele));
    }

}
